package com.myjar.excel.serializer;

import org.apache.poi.ss.usermodel.Cell;

public class BooleanCodec implements ObjectSerializer<Boolean> {

    public final static BooleanCodec instance = new BooleanCodec();

    private BooleanCodec() {
    }

    @Override
    public void write(Cell cell, Boolean aBoolean) {
        cell.setCellValue(aBoolean);
    }

    @Override
    public Boolean read(Cell cell) {
        return cell.getBooleanCellValue();
    }

}
